﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Warensoft.Unity.Communication.Client.Models
{
    public class ODataProperty
    {
        public string Name { get; set; }
        public Type DataType { get; set; }
        public bool IsPremaryKey { get; set; }

        public bool IsNullable { get; set; }
        public object Value { get; set; }
        public T GetValue<T>()
        {
            if (typeof(T).Name ==this.DataType.Name)
            {
                return (T)this.Value;
            }
            return default(T);
        }
    }
}
